<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      let money = 998;
      while (true) {
        let option = +prompt(`请选择您的操作：
                      1、取款
                      2、存款
                      3、查看余额
                      4、退出`);
        if (option === 4) {
          alert("欢迎下次光临！");
          break;
        } else if (option === 1) {
          let m = +prompt("请问您要取多少钱？");
          money -= m;
        } else if (option === 2) {
          let m = +prompt("请问您要存多少钱？");
          money += m;
        } else if (option === 3) {
          alert(`您的余额是:${money}`);
        }
      }
    </script>
  </body>
</html>
